import { isDev, getRequest, postRequest } from '@/api';

const urlsObj = {};
if (isDev) {
  // 员工管理
  urlsObj.getStaffList = getRequest('stafflist');
  urlsObj.getStaffDetail = getRequest('staffdetail');
  urlsObj.deleteStaff = getRequest('deletestaff');
  urlsObj.saveStaff = getRequest('savestaff');
  urlsObj.changeStaffAccountStatus = getRequest('changestaffaccountstatus');
  // 角色管理
  urlsObj.getRoleList = getRequest('rolelist');
  urlsObj.saveCustomRole = getRequest('savecustomrole');
  urlsObj.deleteRole = getRequest('deleterole');
  urlsObj.getRoleLimits = getRequest('rolelimits');
  urlsObj.saveRoleLimits = getRequest('saverolelimits');
  urlsObj.getDefLimitList = getRequest('defaultlimitlist');
  urlsObj.deleteRoleEmployee = getRequest('deleteroleemployee');
  urlsObj.saveRoleEmployee = getRequest('saveroleemployee');
  // 审批管理
  urlsObj.getApproveList = getRequest('approveall');
  urlsObj.getApproveDetail = getRequest('approvespec');
  urlsObj.deleteApprove = getRequest('deleteapprove');
  urlsObj.saveApprove = getRequest('saveapprove');
  // 物料管理
  urlsObj.getMaterielList = getRequest('materiellist');
  urlsObj.getMaterielOutList = getRequest('materieloutlist');
  urlsObj.getMaterielSkuList = getRequest('materiellist');
  urlsObj.getMaterielTypes = getRequest('materieltypes');
  urlsObj.getMaterielDetail = getRequest('materieldetail');
  urlsObj.deleteMateriel = getRequest('deletemateriel');
  urlsObj.saveMateriel = getRequest('savemateriel');
  // 仓库管理
  urlsObj.getStoreList = getRequest('storelist');
  urlsObj.getStoreDetail = getRequest('storedetail');
  urlsObj.deleteStore = getRequest('deletestore');
  urlsObj.saveStore = getRequest('savestore');
  // 供应商管理
  urlsObj.getProviderList = getRequest('providerlist');
  urlsObj.getProviderDetail = getRequest('providerdetail');
  urlsObj.deleteProvider = getRequest('deleteprovider');
  urlsObj.saveProvider = getRequest('saveprovider');
  // 证书管理
  urlsObj.getCredentialWarn = getRequest('credentialwarn');
  urlsObj.getCredentialDevices = getRequest('credentialdevices');
  urlsObj.saveCredentialDevice = getRequest('savecredentialdevice');
  urlsObj.deleteCredentialDevice = getRequest('deletecredentialdevice');
  urlsObj.getCredentialSupplyPerson = getRequest('credentialsupply');
  urlsObj.saveCredentialLetter = getRequest('savecredentialletter');
  urlsObj.deleteCredentialLetter = getRequest('deletecredentialletter');
  urlsObj.getCredentialRegister = getRequest('credentialregister');
  urlsObj.saveCredentialRegister = getRequest('savecredentialregister');
  urlsObj.deleteCredentialRegister = getRequest('deletecredentialregister');
} else {
  // 员工管理
  urlsObj.getStaffList = postRequest('employeeManager/list');
  urlsObj.getStaffDetail = getRequest('employeeManager/detail/{id}');
  urlsObj.deleteStaff = getRequest('employeeManager/del/{id}');
  urlsObj.saveStaff = postRequest('employeeManager/save');
  urlsObj.changeStaffAccountStatus = getRequest('employeeManager/lock/{username}');
  // 角色管理
  urlsObj.getRoleList = getRequest('authGroup/role/list');
  urlsObj.saveCustomRole = postRequest('authGroup/role/save');
  urlsObj.deleteRole = getRequest('authGroup/role/del/{id}');
  urlsObj.getRoleLimits = getRequest('authGroup/list/{id}');
  urlsObj.saveRoleLimits = postRequest('authGroup/roleAuth/save');
  urlsObj.getDefLimitList = postRequest('authGroup/list');
  urlsObj.deleteRoleEmployee = getRequest('authGroup/empRole/del/{roleId}/{empId}');
  urlsObj.saveRoleEmployee = postRequest('authGroup/empRole/add');
  // 审批管理
  urlsObj.getApproveList = postRequest('endorsement/list');
  urlsObj.getApproveDetail = getRequest('endorsement/detail/{id}');
  urlsObj.deleteApprove = getRequest('endorsement/del/{id}');
  urlsObj.saveApprove = postRequest('endorsement/add');
  // 物料管理
  urlsObj.getMaterielList = postRequest('materiel/list');
  urlsObj.getMaterielOutList = postRequest('materiel/outboundList');
  urlsObj.getMaterielSkuList = postRequest('publicInterface/getPurchaseSku');
  urlsObj.getMaterielTypes = getRequest('materieltypes');
  urlsObj.getMaterielDetail = getRequest('materiel/detail/{id}');
  urlsObj.deleteMateriel = getRequest('materiel/del/{id}');
  urlsObj.saveMateriel = postRequest('materiel/add');
  // 仓库管理
  urlsObj.getStoreList = postRequest('storehouse/list');
  urlsObj.getStoreDetail = getRequest('storehouse/detail/{id}');
  urlsObj.deleteStore = getRequest('storehouse/del/{id}');
  urlsObj.saveStore = postRequest('storehouse/add');
  // 供应商管理
  urlsObj.getProviderList = postRequest('vendor/list');
  urlsObj.getProviderDetail = getRequest('vendor/detail/{id}');
  urlsObj.deleteProvider = getRequest('vendor/delete/{id}');
  urlsObj.saveProvider = postRequest('vendor/save');
  // 证书管理
  urlsObj.getCredentialWarn = postRequest('attachVendor/warn');
  urlsObj.getCredentialDevices = postRequest('attdevice/list');
  urlsObj.saveCredentialDevice = postRequest('attdevice/save');
  urlsObj.deleteCredentialDevice = getRequest('/attdevice/delete/{id}');
  urlsObj.getCredentialSupplyPerson = getRequest('attachVendor/list/{id}');
  urlsObj.saveCredentialLetter = postRequest('attachVendor/save');
  urlsObj.deleteCredentialLetter = getRequest('attachVendor/delete/{id}');
  urlsObj.getCredentialRegister = postRequest('attRegistion/list');
  urlsObj.saveCredentialRegister = postRequest('attRegistion/save');
  urlsObj.deleteCredentialRegister = getRequest('attRegistion/delete/{id}');
}

export default urlsObj;
